-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit horizontal velocity during landing #13561
Conversation
…stead of recomputing it in AutoMapper, AutoMapper2 and AutoLine
…nding between alt1 and alt2
999a539
to
199da0f
Compare
I allowed myself to rebase the pr and apply some nit-pick suggestions. What is missing for me is a way to disable the functionality. It works well and the implementation is good but there will for sure be someone who wants the legacy behavior because of a missing distance sensor or special use case. |
199da0f
to
1a39f4a
Compare
Added a comment in my additional commit on how to disable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice implementation. Rebased, reviewed, SITL tested. From my side ready.
Thanks @MaEtUgR . |
Tested on Pixhawk 4 v5 f-450 log: https://review.px4.io/plot_app?log=359b3c8c-ccea-4949-a389-ef3a4065f354 PixRacer v4 f-450 log: https://review.px4.io/plot_app?log=4b200565-eb8f-49d5-8f04-b88d46987463 Observations: |
Tested on NXP FMUK66 v3 Mode Tested: Position Mode. Procedure: Flight in Position mode and notice ground velocity change proporcional to the altitude of the vehicle. Notes: No issue. Log: https://review.px4.io/plot_app?log=b0be1815-e64c-4a6a-808f-b8adce9486db Tested on Pixhawk Pro v4 Mode Tested: Position Mode. Procedure: Flight in Position mode and notice ground velocity change proporcional to the altitude of the vehicle. Notes: No issue. Log: https://review.px4.io/plot_app?log=adab6003-a537-43c3-9c2e-4b31d6003962 Observations: |
I also did some real-world flight testing and if the altitudes |
We found that it's not this pr creating the behavior that is shown above but the problem already existed before and it was only found by thoroughly testing this pr. @bresch will create another pr to get rid of this legacy logic. See https://github.com/PX4/Firmware/blob/a3d30fc970262a589ed2ac94c0c5bf18343162c0/src/lib/flight_tasks/tasks/ManualPosition/FlightTaskManualPosition.cpp#L104-L114 |
Usually, a user doesn't need and want to fly at high speed close to ground. We currently already reduce the vertical speed between
MPC_LAND_ALT{1/2}
so I added the same limitation for the horizontal speed.This also allows more precise control during landing as the scaling on the sticks is reduced.
Additional changes:
_dist_to_ground
in the base FlightTask such that the ManualPosition, AutoMapper(2) and AutoLine can use the same logic without having to recompute it locally.